package sctu.edu.java.year2016.team02.zhoujie.day20160523.chapter6_1;

/**
 * Created by ACER on 2016/5/24.
 */
/*在项目中创建Number类，判断字符串“mingrikejijavabu”中字符‘i’出现的次数*/
public class Number {
    public static void main(String[] args) {
        char b;
        int a = 0;
        String c = "mingrikejijavabu";
        for (int i = 0; i < c.length(); i++) {
            { if (c.charAt(i) == 'i')
                a=a+1;}
        }
        System.out.println(a);
    }

}
